package com.ruoyi.system.service.aggregation.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.aggregation.Video;
import com.ruoyi.system.mapper.aggregation.VideoMapper;
import com.ruoyi.system.service.aggregation.IVideoService;

/**
 * 视频Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-01
 */
@Service
public class VideoServiceImpl implements IVideoService 
{
    @Autowired
    private VideoMapper videoMapper;

    @Override
    public Video selectVideoById(Long id)
    {
        return videoMapper.selectVideoById(id);
    }

    @Override
    public List<Video> selectVideoList(Video video)
    {
        return videoMapper.selectVideoList(video);
    }

    @Override
    public int insertVideo(Video video)
    {
        video.setCreateTime(DateUtils.getNowDate());
        return videoMapper.insertVideo(video);
    }

    @Override
    public int updateVideo(Video video)
    {
        video.setUpdateTime(DateUtils.getNowDate());
        return videoMapper.updateVideo(video);
    }

    @Override
    public int deleteVideoById(Long id)
    {
        return videoMapper.deleteVideoById(id);
    }
}

